#include <assert.h>
#include "accountao_factory.h"
#include "accountao_stub4web.h"
#include "accountao_stub4app.h"
//#include "accountao.h"

using namespace erp::account::ao;

bool CAccountAoFactory::s_AccountAoInit = false;

IAccountAo* CAccountAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CAccountAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_AccountAoInit)
        {
            int iRetCode = CAccountAo::Initialize();
            assert(iRetCode == 0);
            s_AccountAoInit = true;
        }   	
        return (new CAccountAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IAccountAoAsyc* CAccountAoFactory::GetAsycObject()
{
	return (new CAccountAoStub4App);
}
